////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                            //
//                                                         WNProject                                                          //
//                                                                                                                            //
//            This file is distributed under the BSD 2-Clause open source license. See License.txt for details.               //
//                                                                                                                            //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef __WN_FIBER_PRIVATE_DATA_H__
#define __WN_FIBER_PRIVATE_DATA_H__

#include "WNCore/inc/WNTypes.h"
#include "WNFibers/inc/WNFibers.h"
#include "WNFibers/inc/WNFibersConfig.h"

namespace WNFibers {
    struct WNFiberPrivateData {
        WN_POINTER stack;                   // bottom of our stack
        WN_UINT32  stacksize;               // how large our stack is
        WNFiberManager* manager;
        WN_POINTER userdata;                // userdata

        #ifdef _WN_FIBER_USE_LIBRARIES
            WN_FIBER_T fiberStruct;      // the struct that our library expects for fibers
            WN_UINT32 cont;
        #else
            WN_POINTER newstackloc;         // where our stack actually ends up
            WN_POINTER returnstacklocation; // when we are done, where will we comd back to
        #endif
    };
}

#endif // __WN_FIBER_PRIVATE_DATA_H__